<template>
  <div>
    <div v-for="val,key in list" :key="key" class="">
      <div class="item cell" v-if="key == 0">
        <span>{{val.name}}:{{val.value.counts}}</span>
        <div class="item-box">
          <!-- <div class="subbox cell">
            <span>现金</span>
            <span>{{val.value.pay_cash}}</span>
          </div>
          <div class="subbox cell">
            <span>银积分</span>
            <span>{{val.value.pay_sliver}}</span>
          </div> -->
        </div>
      </div>
      <div class="item cell" v-else-if="key == 1">
        <span>{{val.name}}:{{val.value.counts}}</span>
        <!-- <div class="item-box">
          <div class="subbox">
            <span>现金</span>
            <span>{{val.value.pay_cash}}</span>
          </div>
          <div class="subbox">
            <span>银积分</span>
            <span>{{val.value.pay_sliver}}</span>
          </div>
        </div> -->
      </div>

      <div class="item cell" v-else>
        <span>{{val.name}}:{{val.value.counts}}</span>
        <!-- <div class="item-box">
          <div class="subbox">
            <span>现金</span>
            <span>{{val.value.pay_cash}}</span>
          </div>
          <div class="subbox">
            <span>银积分</span>
            <span>{{val.value.pay_sliver}}</span>
          </div>
        </div> -->
      </div>
      <el-divider v-if="key!=list.length-1"></el-divider>

    </div>
  </div>
</template>

<script>

export default {
  props: {
    list: {
      type: Array
    }
  }
}
</script>

<style lang="scss" scoped>
.item {
  margin-bottom: 20px;
  .cell {
    line-height: 28px;
    font-size: 14px;
    font-weight: bold;
  }
  .item-box {
    display: flex;
    .subbox {
      width: 50%;
      display: flex;
      flex-direction: column;
    }
  }
}
</style>